<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>项目代理</title>

    <!-- Bootstrap -->
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <!--自建css文件-->
    <link rel="stylesheet" href="__STATIC__/index/css/cmgd.css">
    <link rel="stylesheet" type="text/css" href="/static/admin/webupload/webuploader.css">
    <link rel="stylesheet" type="text/css" href="/static/admin/webupload/style.css">
    <link rel="stylesheet" type="text/css" media="all" href="/sldate/daterangepicker-bs3.css" />
    <script type="text/javascript" src="/sldate/moment.js"></script>
    <!--<script type="text/javascript" src="/sldate/daterangepicker.js"></script>-->
        <!--<script type="text/javascript">-->
            <!--$(document).ready(function() {-->
                <!--$('#reservation').daterangepicker(null, function(start, end, label) {-->
                    <!--console.log(start.toISOString(), end.toISOString(), label);-->
                <!--});-->
            <!--});-->
        <!--</script>-->
</head>
<body>
{include file="index/header" /}
    <!--中间三列的排版面，row-->
<div class="row">
    <div class="col-xs-4">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="glyphicon glyphicon-user"></i>关于我们</h3>
            </div>
            {volist name='about' id='about'}
            <div class="panel-body">
                <p>{$about.introduce}</p>
                <address>
                    <strong><p><i class="glyphicon glyphicon-earphone"></i> ： {$about.phone}</p></strong>
                    <p><i class="glyphicon glyphicon-envelope"></i> ：<a href="mailto:#">{$about.mail}</a></p>
                    <p><img src="/uploads/images/{$about.pic}" alt="公众号二维码" class="img-rounded"></p>
                </address>
            </div>
            {/volist}
        </div>
    </div>
        <div class="col-xs-4" style="width:66%;float:left;">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="glyphicon glyphicon-user"></i>项目代理</h3>
                </div>


                <div class="panel-body">
                    <form class="form-horizontal m-t"  method="post" name="add" action="project" onSubmit="return check()">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">图片：</label>
                            <div class="input-group col-sm-4">
                                <input type="hidden" id="data_photo" name="pic" >
                                <div id="fileList" class="uploader-list" style="float:right"></div>
                                <div id="imgPicker" style="float:left">选择图片</div>
                                <img id="img_data" height="100px" style="float:left;margin-left: 50px;margin-top: -10px;" src="/static/admin/images/no_img.jpg"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商标名称：</label>
                            <div class="input-group col-sm-4">
                                <input id="name" type="text" class="form-control" name="name" placeholder="请输入商标名称">
                            </div>　
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商标分类：</label>
                            <div class="input-group col-sm-4">
                                <select class="form-control m-b chosen-select" name="type" id="type">
                                    <option value="">==请选择==</option>
                                    {if !empty($cate)}
                                    {volist name='cate' id='cate'}
                                    <option value="{$cate.id}">{$cate.id}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">注册号：</label>
                            <div class="input-group col-sm-4">
                                <input id="registration" type="text" class="form-control" name="registration"  placeholder="请输入注册号">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">核定使用范围：</label>
                            <div class="input-group col-sm-4">
                                <textarea type="text" rows="3" name="description" id="approved"  placeholder="请输入核定使用范围" class="form-control"></textarea>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">价格：</label>
                            <div class="input-group col-sm-4">
                                <input id="price" type="text" class="form-control" name="price"  placeholder="请输入价格">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">联系电话：</label>
                            <div class="input-group col-sm-4">
                                <input id="phone" type="text" class="form-control" name="phone"  placeholder="请输入手机号码">
                            </div>
                        </div>


                        <div class="hr-line-dashed"></div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>


                </div>

            </div>
        </div>
    </div>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/webupload/webuploader.min.js"></script>
<script type="text/javascript">
    var $list = $('#fileList');
    //上传图片,初始化WebUploader
    var uploader = WebUploader.create({

        auto: true,// 选完文件后，是否自动上传。
        swf: '/static/admin/js/webupload/Uploader.swf',// swf文件路径
        server: "{:url('Upload/upload')}",// 文件接收服务端。
        duplicate :true,// 重复上传图片，true为可重复false为不可重复
        pick: '#imgPicker',// 选择文件的按钮。可选。

        accept: {
            title: 'Images',
            extensions: 'gif,jpg,jpeg,bmp,png',
            mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'
        },

        'onUploadSuccess': function(file, data, response) {
            $("#data_photo").val(data._raw);
            $("#img_data").attr('src', '/uploads/images/' + data._raw).show();
        }
    });

    uploader.on( 'fileQueued', function( file ) {
        $list.html( '<div id="' + file.id + '" class="item">' +
                '<h4 class="info">' + file.name + '</h4>' +
                '<p class="state">正在上传...</p>' +
                '</div>' );
    });

    // 文件上传成功
    uploader.on( 'uploadSuccess', function( file ) {
        $( '#'+file.id ).find('p.state').text('上传成功！');
    });

    // 文件上传失败，显示上传出错。
    uploader.on( 'uploadError', function( file ) {
        $( '#'+file.id ).find('p.state').text('上传出错!');
    });


</script>
<script language="javascript">
    function check() {
        if (document.add.type.value == "") {
            window.alert("请输入商标分类");
            return false;
        }
        if (document.add.registration.value == "") {
            window.alert("请输入注册号");
            return false;
        }
        if (document.add.price.value == "") {
            window.alert("请输入价格");
            return false;
        }

        if (document.add.phone.value == "") {
            window.alert("请输入正确的手机号码");
            return false;
        }
    }
</script>

    <div class="clear" style=" clear:both;"> </div>
    {include file="index/footer" /}



    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>